//
//  MyTools.h
//  myappinSchool1.0
//
//  Created by XuLee on 15/7/22.
//  Copyright (c) 2015年 XuLee. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "UIView+Toast.h"
#import "MBProgressHUD.h"
#import <SystemConfiguration/SCNetworkReachability.h>
#import <AFNetworking.h>

#define HEIGHT     [[UIScreen mainScreen] bounds].size.height //获取屏幕的高度
#define WIDTH      [[UIScreen mainScreen] bounds].size.width  //获取屏幕的宽度



#define IS_IPHONE5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define IS_iOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 ? YES : NO)
#define StatueBarHeight (IS_iOS7 ? 20:0)
#define NavigationbarHeight (IS_iOS7 ? 44:0)
#define ViewOriginY (IS_iOS7 ? 64:0)
#define RGB(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#define kMBProgressTag 9999
#define IS_iOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0 ? YES : NO)


#pragma mark 16进制颜色
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define MYColor       0xff6a6a
#define MYGreen       0x1DE3DD//青涩
#define MYBlue        0x61d2fe//蓝色
#define MYRed         0xff5534//红色
//#define MYHEIGHTRED   0xff4966//亮红
#define MYYellow      0xfecf55//黄
#define MYGray        0xcecece//背景浅灰
#define MYSGray       0x7F7F7F//字体深灰

#define MYHEIGHT [[UIScreen mainScreen] bounds].size.height/667
#define MYWIDTH  [[UIScreen mainScreen] bounds].size.width/375

//EF2800
#define HaveNetWork [MyTools connectedToNetwork]


// 请求成功之后回调的 Block
//typedef void(^SuccessBlock) (AFHTTPRequestOperation *operation, id responseObject);

// 请求失败之后回调的 Block
//typedef void(^FailBlock) (AFHTTPRequestOperation *operation, NSError *error);


@interface MyTools : NSObject
+ (BOOL)connectedToNetwork;
+ (AFHTTPRequestOperationManager *)initAFHttpManager;
//+(NSMutableArray *)myAF:(NSString *)url and:(nullable id)message;
@end



















